<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <com.google.android.material.appbar.AppBarLayout
        android:id="@+id/app_bar"
        android:layout_width="match_parent"
        android:layout_height="?attr/actionBarSize"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <dev.tinelix.jabwave.ui.views.base.JabwaveActionBar
            android:id="@+id/actionbar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="?attr/actionBarColor"
            android:minHeight="?attr/actionBarSize"
            android:theme="@style/ApplicationTheme.Toolbar.Dark"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:navigationIcon="@drawable/ic_back"
            app:subtitleTextColor="?android:attr/textColorSecondaryInverse"
            app:contentInsetLeft="0dp"
            app:contentInsetStart="0dp"
            app:contentInsetStartWithNavigation="0dp"
            app:title="@string/about_app">

            <include layout="@layout/layout_actionbar" />

        </dev.tinelix.jabwave.ui.views.base.JabwaveActionBar>

    </com.google.android.material.appbar.AppBarLayout>

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="0dp"
        app:backgroundColor="?attr/msgrBackgroundColor"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/app_bar"
        tools:ignore="SpeakableTextPresentCheck">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginStart="16dp"
                android:layout_marginTop="16dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_margin="8dp"
                    android:orientation="horizontal">

                    <ImageView
                        android:id="@+id/imageView"
                        android:layout_width="60dp"
                        android:layout_height="60dp"
                        android:padding="6dp"
                        app:srcCompat="@mipmap/ic_launcher" />

                    <LinearLayout
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginEnd="12dp"
                        android:layout_marginStart="12dp"
                        android:orientation="vertical">

                        <TextView
                            android:id="@+id/app_name"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:fontFamily="sans-serif-medium"
                            android:text="@string/app_name"
                            android:textColor="?attr/colorAccent"
                            android:textSize="16sp" />

                        <TextView
                            android:id="@+id/app_version"
                            android:layout_width="match_parent"
                            android:layout_height="wrap_content"
                            android:gravity="center_vertical"
                            android:text="@string/about_app_version" />

                    </LinearLayout>
                </LinearLayout>

            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="8dp"
                android:layout_marginEnd="16dp"
                android:layout_marginStart="16dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <Button
                        android:id="@+id/source_code_link"
                        style="@style/Widget.AppCompat.Button.Borderless.Colored"
                        android:layout_width="match_parent"
                        android:layout_height="40dp"
                        android:insetBottom="0dp"
                        android:insetLeft="-4dp"
                        android:insetRight="-4dp"
                        android:insetTop="0dp"
                        android:text="@string/source_code"
                        android:textAlignment="viewStart"
                        android:textAllCaps="false"
                        android:textColor="?attr/colorAccent"
                        tools:ignore="TouchTargetSizeCheck" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>

            <androidx.cardview.widget.CardView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginBottom="16dp"
                android:layout_marginEnd="16dp"
                android:layout_marginStart="16dp">

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/license_notification"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:layout_margin="8dp"
                        android:text="@string/about_app_license"
                        android:textColor="?attr/colorOnBackground" />
                </LinearLayout>
            </androidx.cardview.widget.CardView>

        </LinearLayout>
    </ScrollView>

</androidx.constraintlayout.widget.ConstraintLayout>